package 线程.demo16;

/**
 * @author wql
 * @version 1.0
 * @date 2022/11/1 22:27
 */

public class Boy extends Thread{
    private BankCard bankCard;

    public Boy(BankCard bankCard) {
        this.bankCard = bankCard;
    }

    @Override
    public void run() {
        for (int i = 0; i < 5; i++) {
            bankCard.save(1000);
        }
    }
}
